﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VanTaiProperty;
using VanTaiData;
using VanTaiBLL;
using Roles;

namespace VanTaiTMS.Page
{
    public partial class Default : System.Web.UI.Page
    {
        #region[Define]
        private clsBusiness_TM_Usercs clsUser = new clsBusiness_TM_Usercs();
        #endregion

        #region[Controller]
        protected void Page_Load(object sender, EventArgs e)
        {
            HttpCookie cookie = Request.Cookies["UserLogin"];
            if (cookie != null)
            {
                if (!IsPostBack)
                {
                    UpdateStatusUser();
                }
            }
        }
        #endregion

        #region[Function]
        protected void UpdateStatusUser()
        {
            HttpCookie cookie = Request.Cookies["UserLogin"];
            VanTaiProperty.clsTMUserProperty obj = new clsTMUserProperty();
            obj.Users_ID = int.Parse(cookie["Users_ID"]);
            obj.bitSys = true;
            VanTaiBLL.clsBusiness_TM_Usercs.UpdateStatusUser(obj);
        }
        #endregion
    }
}